import { CCell, Cell, TableBody, TableRow } from "../src/comp/TableExt";
import * as React from "react";

{ ['安全档案','登记资料'].map((t,i) => {
  return (
    <TableRow>
      <Cell>(2){orc[t]}{i}</Cell>
      <CCell>{orc.安全档案}</CCell>
    </TableRow>
  );
} )

 const inspectionContent=[
    {
      bigNo: 1,
      bigLabel:'技术资料',
      cutLines:[5],
      items:[
        {
          item:1.4,
          label:'使用资料',
          iClass:'B',
          subItems:['(1)使用登记资料','(2)安全技术档案','(3)管理规章制度','(4)日常维护保养合同','(5)特种设备作业人员证']
        }
      ]
    },
    {
      bigNo: 2,
      bigLabel:'机房(机器设备间)及相关设备',
      cutLines:[10,11],
      items:[
        {
          item:2.1,
          label:'通道与通道门',
          iClass:'C',
          subItems:['(1)通道设置','(2)通道照明','(3)通道门']
        },
        {
          item:2.5,
          label:'(1)照明、照明开关',
          iClass:'C',
        },
        {
          item:2.6,
          label:'(2)主开关与照明等电路的控制关系',
          iClass:'B',
        },
        {
          item:2.7,
          label:'驱动主机',
          iClass:'B',
          subItems:['(2)工作状况','(3)轮槽磨损','(4)制动器动作情况','★(5)手动紧急操作装置']
        },
        {
          item:2.8,
          label:'控制柜、紧急操作和动态测试装置',
          iClass:'B',
          subItems:['(2)断错相保护','(4)紧急电动运行装置','☆(6)层门和轿门旁路装置','☆(7)门回路检测功能','☆(8)制动器故障保护','☆(9)自动救援操作装置']
        },
        {
          item:2.9,
          label:'限速器',
          iClass:'B',
          subItems:['(2)电气安全装置','(3)封记及运转情况','(4)动作速度校验']
        },
        {
          item:2.10,
          label:'(2)接地连接',
          iClass:'C',
        },
        {
          item:2.11,
          label:'电气绝缘',
          iClass:'C',
        }
      ]
    },
    {
      bigNo: 3,
      bigLabel:'井道及相关设备',
      cutLines:[6,7],
      items:[
        {
          item:3.4,
          label:'井道安全门',
          iClass:'C',
          subItems:['(3)门锁','(4)电气安全装置']
        },
        {
          item:3.5,
          label:'井道检修门',
          iClass:'C',
          subItems:['(3)门锁','(4)电气安全装置']
        },
        {
          item:3.7,
          label:'轿厢与井道壁距离',
          iClass:'B',
        },
        {
          item:3.10,
          label:'极限开关',
          iClass:'B',
        },
        {
          item:3.11,
          label:'井道照明',
          iClass:'C',
        },
        {
          item:3.12,
          label:'底坑设施与装置',
          iClass:'C',
          subItems:['(1)底坑底部','(3)停止装置']
        },
        {
          item:3.14,
          label:'(2)限速绳张紧装置的电气安全装置',
          iClass:'B',
        },
        {
          item:3.15,
          label:'缓冲器',
          iClass:'B',
          subItems:['(3)固定和完好情况','(4)液位和电气安全装置','(5)对重越程距离']
        },
      ]
    },
    {
      bigNo: 4,
      bigLabel:'轿厢与对重',
      cutLines:[10],
      items:[
        {
          item:4.1,
          label:'轿顶电气装置',
          iClass:'C',
          subItems:['(1)检修装置','(2)停止装置']
        },
        {
          item:4.3,
          label:'(3)安全门(窗)电气安全装置',
          iClass:'C',
        },
        {
          item:4.5,
          label:'对重(平衡重)块',
          iClass:'B',
          subItems:['(1)固定','(2)识别数量的措施']
        },
        {
          item:4.6,
          label:'(2)轿厢超面积载货电梯的控制条件',
          iClass:'C',
        },
        {
          item:4.8,
          label:'紧急照明和报警装置',
          iClass:'B',
          subItems:['(1)紧急照明','(2)紧急报警装置']
        },
        {
          item:4.9,
          label:'地坎护脚板',
          iClass:'C',
        },
        {
          item:4.10,
          label:'超载保护装置',
          iClass:'C',
        }
      ]
    },
    {
      bigNo: 5,
      bigLabel:'悬挂装置、补偿装置及旋转部件防护',
      cutLines:[7],
      items:[
        {
          item:5.1,
          label:'悬挂装置、补偿装置的磨损、断丝、变形等情况',
          iClass:'C',
        },
        {
          item:5.2,
          label:'绳端固定',
          iClass:'C',
        },
        {
          item:5.3,
          label:'补偿装置',
          iClass:'C',
          subItems:['(1)绳(链)端固定','(2)电气安全装置','(3)补偿绳防跳装置']
        },
        {
          item:5.5,
          label:'松绳(链)保护',
          iClass:'B',
        },
        {
          item:5.6,
          label:'旋转部件的防护',
          iClass:'C',
        },
      ]
    },
    {
      bigNo: 6,
      bigLabel:'轿门与层门',
      cutLines:[7,7],
      items:[
        {
          item:6.3,
          label:'门间隙',
          iClass:'C',
          subItems:['(1)门扇间隙','(2)人力施加在最不利点时间隙']
        },
        {
          item:6.4,
          label:'玻璃门防拖曳措施',
          iClass:'C',
        },
        {
          item:6.5,
          label:'防止门夹人的保护装置',
          iClass:'B',
        },
        {
          item:6.6,
          label:'门的运行与导向',
          iClass:'B',
        },
        {
          item:6.7,
          label:'自动关闭层门装置',
          iClass:'B',
        },
        {
          item:6.8,
          label:'紧急开锁装置',
          iClass:'B',
        },
        {
          item:6.9,
          label:'门的锁紧',
          iClass:'B',
          subItems:['(1)层门门锁装置[不含6.9(1)①]','(2)轿门门锁装置[不含6.9(1)①]']
        },
        {
          item:6.10,
          label:'门的闭合',
          iClass:'B',
          subItems:['(1)机电联锁','(2)电气安全装置']
        },
        {
          item:6.11,
          label:'☆轿门开门限制装置及轿门的开启',
          iClass:'B',
          subItems:['(1)轿门开门限制装置','(2)轿门的开启']
        },
        {
          item:6.12,
          label:'门刀、门锁滚轮与地坎间隙',
          iClass:'C',
        }
      ]
    },
    {
      bigNo: 8,
      bigLabel:'试验',
      cutLines:[7,8],
      items:[
        {
          item:8.1,
          label:'平衡系数试验',
          iClass:'C'
        },
        {
          item:8.2,
          label:'★轿厢上行超速保护装置试验',
          iClass:'C'
        },
        {
          item:8.3,
          label:'☆轿厢意外移动保护装置试验',
          iClass:'B',
          subItems:['(1)制停情况','(2)自监测功能']
        },
        {
          item:8.4,
          label:'轿厢限速器－安全钳试验',
          iClass:'B',
        },
        {
          item:8.5,
          label:'对重(平衡重)限速器—安全钳试验',
          iClass:'B',
        },
        {
          item:8.6,
          label:'运行试验',
          iClass:'C',
        },
        {
          item:8.7,
          label:'应急救援试验',
          iClass:'B',
          subItems:['(1)救援程序','(2)救援通道','(3)救援操作']
        },
        {
          item:8.9,
          label:'空载曳引检查',
          iClass:'B',
        },
        {
          item:8.10,
          label:'上行制动工况曳引检查',
          iClass:'B',
        },
        {
          item:8.11,
          label:'▲下行制动工况曳引检查',
          iClass:'B',
        },
        {
          item:8.12,
          label:'▲静态曳引试验',
          iClass:'B',
        },
        {
          item:8.13,
          label:'制动试验',
          iClass:'B',
        }
      ]
    }
  ];



  recordPrintList.map((each, i) => {
    const itemView= isItemNo? <ItemUniversal key={i} ref={clRefs.current![i]}  x={x}  y={y}
                                             procedure={generalFormat[x].items[y].procedure}  details={generalFormat[x].items[y].details}
      />
      :
      React.cloneElement(each.zoneContent as React.ReactElement<any>, {
        ref: clRefs.current![i],
        //procedure: generalFormat[1].items[0].procedure,
        //details: generalFormat[1].items[0].details,
        key: i
      });
      if(each.items.indexOf(action)>=0 || action==='ALL')
        return  itemView;
      else
        return <div key={i} css={{display:'none'}}>
             {itemView}
        </div>;
      })

